<template>
  <div class="tip">
    <el-form :inline="true" :model="searchData" class="demo-form-inline flex">
      <el-form-item prop="time">
        <el-date-picker
          v-model="searchData.time"
          type="daterange"
          range-separator=" ~ "
          start-placeholder="开始时间"
          end-placeholder="结束时间"
          clearable
          value-format="yyyy-MM-dd"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
      </el-form-item>
      <el-form-item style="margin-left:auto;">
        <el-button type="primary" style="margin-left:auto;height:96rpx;" icon="el-icon-printer" @click="print">打印</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      searchData: {
        time: []
      }
    }
  },
  methods: {
    search() {
      this.$emit('search', this.searchData)
    },
    print() {
      this.$emit('print')
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
